import unittest
from appium import webdriver
import os

PATH = lambda p: os.path.abspath(
    os.path.join(os.path.dirname(__file__), p)
)


class BasePage(unittest.TestCase):
    # 初始化
    def setUp(self):
        url = 'http://localhost:4723/wd/hub'
        desired_caps = {
            "platformName": 'Android',
            "platformVersion": '8.0.0',
            "deviceName": 'H7AZCY01M810LFA',
            "appPackage": 'com.addcn.android.design591',
            "appActivity": '.page.StartActivity'
        }
        self.driver = webdriver.Remote(url, desired_caps)

    # 测试完后，数据回收
    def tearDown(self):
        self.driver.quit()



